package com.example.milimili;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;

import java.util.zip.Inflater;

public class NoWebActivity extends AppCompatActivity {

    private String title,content;
    private ImageButton backBtn;
    private TextView titleText,contentText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_no_web);
        Intent intent=this.getIntent();
        title=intent.getStringExtra("title");
        content=intent.getStringExtra("context");
        backBtn=findViewById(R.id.backButton);
        backBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
//                Intent intent=new Intent(NoWebActivity.this,HistoryActivity.class);
//                NoWebActivity.this.startActivity(intent);
                NoWebActivity.this.finish();
            }
        });
        titleText=findViewById(R.id.title);
        contentText=findViewById(R.id.content);
        titleText.setText(title);
        contentText.setText(content);
        contentText.setMovementMethod(ScrollingMovementMethod.getInstance());
    }
}